package com.dc.common.constant;

/**
 * @author zhuangcy
 * @date 2021/1/16
 * @description 响应状态类
 */
public enum ResultStatus {
    /**
     * 成功code
     */
    SUCCESS_CODE(200, "操作成功"),
    /**
     * 失败code
     */
    FAIL_CODE(400, "操作失败"),
    /**
     * 未认证code
     */
    NOT_CERTIFIED_CODE(401, "认证失败，请重新登录"),
    /**
     * 请求方式错误
     */
    REQUEST_FAIL_CODE(402, "请求方式错误"),
    /**
     * 未授权code
     */
    UNAUTHORIZED_CODE(403, "认证授权失败，请重新登录"),
    /**
     * 系统错误code
     */
    ERROR_CODE(500, "系统错误，请稍后再次尝试");

    /**
     * 响应码
     */
    private int code;
    /**
     * 响应消息
     */
    private String msg;

    ResultStatus(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
